home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
comm
/
misc
/
zedzap05.lha
/
welmat.lng
< prev
next >
Wrap
Text File
|
1992-11-27
|
20KB
|
676 lines
;
; $Header: Welmat:src/RCS/welmat.lng,v 1.32 92/10/14 00:04:33 rwm Exp Locker: rwm $
;
; This is an example config file, and is the one that I am currently running
; on 163/109 (line 1) and 1:163/139 (line 2). It is NOT reccomended that anyone
; run this script exactly as it is shown as it is a 'testing' script where I
; am doing many things that people would not be doing in a normal situation.
; I am attempting to test all the features of Welmat, not to emulate the old
; version of Welmat or to provide an example of the 'best' way to set things
; up.
;
; If you do not use a section of a script, semicolon it out so that it will
; not take up ram while you are RUNNING ;-)
;
; Just in case a null jump is SubJump'd ;-)
Print "You Goofed up your config, eh!"
return
; Wow, We got a request to dial.
dodial:
ModemClear
PutLog "[$(line)] $<time> Trying To Connect To $(remote.address)"
set host.wzcap 13
system "welmat:Lookup $(remote.address) dh3:IGEN/ $(line) "
set remote.address ${$(line).address}
set remote.zone ${$(line).zone}
set remote.net ${$(line).net}
set remote.node ${$(line).node}
set remote.point ${$(line).point}
set remote.domain ${$(line).domain}
set remote.number ${$(line).number}
set remote.password ${$(line).password}
Jump dodial1
dodial1:
; The nodes that I will be calling
CmpI $(remote.number) ""
FalseJump dodial2
PutLog "[$(line)] $<time> I Do Not Know The Number For That Node"
; reports back to the script that caused the dial that it couldn't dial
ReportSesStat 36
Jump waitring
dodial2:
SmartSend "ATM1DT$(remote.number)|"
; Set the slave state to 'Outbound'
Set state "DIALING"
; Look for a modem response (60 + 15 seconds)
GetResponse 75
CmpI $(event) "CONNECT"
TrueJump callconnect
PutLog "[$(line)] $<time> $(EVENT) ($(lastresponse))"
CmpI $(event) "BUSY"
falseJump dodial3
set temp 5
jump dodial3
dodial3:
PutLog "[$(line)] $<time> Session Result $(temp)"
ReportSesStat $(temp)
Jump waitring
callconnect:
Set state "SESSION"
PutLog "[$(line)] $<time> $(lastresponse) ($(baud))"
PutLog "[$(line)] $<time> Connection Established"
Jump callconnect3
callconnect3:
; Send files destined to this site, regardless of YooHoo
set called $(remote.address)
Connected $(called)
; don't allow 'request on us' type information, even though it's not possible
; with the current protocols anyways.
set host.freq FALSE
GetOutbound
; PutLog "[$(line)] $<time> GetOutbound: $(event) Wzcap:$(host.wzcap)"
PutLog "[$(line)] $<time> Connected To $(remote.address)"
CmpI $(event) WAZOO
FalseJump callconnect.1
PutLog "[$(line)] $<time> Remote Is Using 'WaZoo' Handshake"
CmpI $(called) $(remote.address)
TrueJump callconnect.2
PutLog "[$(line)] $<time> Expected $(called)"
callconnect.2:
set IsOutbound TRUE
SubJump wazoo
set IsOutbound FALSE
; $(remote.wzfreq) is a boolean - Send FREQ's anyways...
FindFreq $(called)
CmpI $(host.wzcap) 64
truejump dofunkyout
CmpI $(host.wzcap) 8
truejump zedzapout
CmpI $(host.wzcap) 4
truejump zedzipout
setmailerflags "DY,PN"
PutLog "[$(line)] $<time> Protocol:FTS-1/FTS-7"
XprSetup xprfts.library "$(ftsflags.$(remote.product))"
XprSend ""
XprClose
PutLog "[$(line)] $<time> Session Result $(RC)"
ReportSesStat $(RC)
Jump waitring
callconnect.1:
CmpI $(event) FTS1
TrueSubJump showfts1
CmpI $(event) FTS1
TrueJump callconnect.2
ReportSesStat 99
Jump waitring
showfts1:
PutLog "[$(line)] $<time> Remote Is Using 'FTS-1' Handshake"
return
freeline:
; close the modem to allow for another device to grab the line
ModemClose
; an 'ewe-icky-kludge' to wait a bit. TODO: Fix this
System "Wait 3"
slaveloop:
SubJump setglobals
ModemOpen
Print "ModemOpen $(RC)\n"
TrueJump waitring
; what about if it fails? Maybe just exit the slave with a RETURN?
; PutLog "Death, Drugs, and Dead modems!!!"
FlushLog
return
; HoldOnASec:
; for some reason we may crash before we can do a modeminit
; System "Wait 3"
waitring:
; Initialize the modem - Return is 'false' if init string not successfull.
ModemClear
ModemInit
Print "ModemInit $(RC)\n"
FalseJump freeline
; Check the call queue for a call - Will set the appropriate variables if a
; call was present, and return 'TRUE' in RC
CheckCall
Print "CheckCall $(RC)\n"
TrueJump dodial
; Variable <abort> figures out the count of 'abort' requests.
set RC $<abort>
FalseJump waitring1
Print "Detected An Abort\n"
PutLog "[$(line)] $<time> Exiting Slave"
CmpI $<slaves> 1
TrueSubJump CheckZedZap
ModemClose
return
CheckZedZap:
Print "Closing Final Slave\n"
CmpI $(OpenZedZap) 1
TrueSubJump CloseZedZap
return
CloseZedZap:
; reopen the library... only this time say we do not want to open the
; dos.library... If any other program calls the library, it will appear
; as if use_dos_lib is false (which is the default)
Print "zedzap.library was previously used\n"
XprSetup xprzedzap.library TN,OR,B16,F0,E30,AN,DN,KN,SN,RN,C$(BAUD),NY,M8192,UN
; this will finally close the dos.library...
Print "closing xprzedzap.library\n"
XprClose
return
waitring1:
CmpI $(state) "WAITING"
TrueJump waitring0
set state "WAITING"
PutLog "[$(line)] $<time> Waiting For A Call..."
waitring0:
set OwnDevUnit TRUE
; $(CallInterupt) sets whether a rexx CALL command will Interupt the GetResponse
set CallInterupt TRUE
GetResponse 45
set OwnDevUnit FALSE
set CallInterupt FALSE
CmpI $(event) OWNDEVUNIT
TrueJump freeline
CmpI $(event) "RING"
FalseJump waitring
set state "ANSWERING"
PutLog "[$(line)] $<time> Modem:$(lastresponse)"
PutLog "[$(line)] $<time> Detected An Inbound Call ; Answering"
; Smartsend uses all the special characters while sending (~,`,^,v,|)
SmartSend "ATA|"
FlushLog
; Set the slave state to "Inbound"
GetResponse 75
CmpI $(event) "CONNECT"
TrueJump waitring3
Jump waitring
waitring3:
PutLog "[$(line)] $<time> Modem:$(lastResponse)"
PutLog "[$(line)] $<time> Connection Established At $(baud)bps"
; Delay for 4 seconds - Delay requires an 'open modem' at the moment
Delay 4
ModemClear
mconnect:
set temp "* Welcoming you with ${WelmatName} at $(host.address)\r\n"
Print $(temp)
Send $(temp)
Send "\r\n"
Send "[][][][][][][][][][][][][][][][][][][][][][][][][]\r\n"
Send "[] Welcome to the Distant Contact []\r\n"
Send "[] (the official Contact!-BBS development site) []\r\n"
Send "[] supporting link rates of 300 to 14400bps []\r\n"
Send "[][][][][][][][][][][][][][][][][][][][][][][][][]\r\n"
Send "\r\n"
Send "Please hit <ESC> twice to load the BBS\r\n"
; clears the variable so that any memory is free'd.
Clear temp
; check for the inbound event (YooHoo,Login,FTS1,etc)
set host.freq TRUE
GetInbound 60
CmpI $(event) LOGIN
FalseJump mconnect2
CmpI $(namebuf) "bbs"
TrueJump startbbs
CmpI $(namebuf) ""
TrueJump mconnect
Jump waitring
startbbs:
set temp "-=>Loading BBS... Please wait about 10 seconds...\r\n"
Print $(temp)
Send $(temp)
clear temp
set stack 100000
set ShowSystem TRUE
System "execute startbbs $(baud)"
set ShowSystem FALSE
jump waitring
mconnect2:
CmpI $(event) FTS1
FalseJump mconnect3
PutLog "[$(line)] $<time> Attempting 'FTS-1' Handshake"
setmailerflags "DY,PY"
Set remote.address 1:1/1.1
; A guess at a good set of flags...
PutLog "[$(line)] $<time> Protocol:FTS-1/FTS-7"
XprSetup xprfts.library "7y,cy,ob,ib,sy,bn,an,ny,wy,fy"
XprReceive ""
XprClose
PutLog "[$(line)] $<time> Session Result $(RC)"
ReportSesStat $(RC)
Jump waitring
mconnect3:
CmpI $(event) GOTYOOHOO
FalseJump mconnect4
PutLog "[$(line)] $<time> Attempting 'WaZoo' Handshake"
SubJump wazoo
FalseJump waitring
WazooRespond
CmpI $(event) 2U2
FalseJump waitring
PutLog "[$(line)] $<time> 'WaZoo' Handshake Successful"
; Send files destined to the site
Connected $(remote.address)
CmpI $(host.wzcap) 64
truejump dofunkyin
CmpI $(host.wzcap) 8
truejump zedzapin
CmpI $(host.wzcap) 4
truejump zedzipin
setmailerflags "DY,PN"
PutLog "[$(line)] $<time> Protocol:FTS-1/FTS-7"
XprSetup xprfts.library "$(ftsflags.$(remote.product))"
XprReceive ""
XprClose
PutLog "[$(line)] $<time> Session Result $(RC)"
ReportSesStat $(RC)
Jump waitring
mconnect4:
ReportSesStat 111
Jump waitring
; this subroutine is called when a file is successfully received.
filenotify:
set RC $(FTS1)
FalseJump filenotify1
PutLog "[$(line)] $<time> FTS1 Receive $(remfile) ($(recfile))"
Pattern $(remfile) #?.REQ
FalseJump filenotify0
; file requests not handled in FTS1
return
filenotify0:
; set whatrun "run dh3:welmat/wnotify >>dh3:welmat/freq.log dh3:welmat/wnotify.cfg $(remfile) $(infile) \"$(remote.address)\" $(line)"
; Print $(whatrun)
; system $(whatrun)
return
filenotify1:
; Pattern $(remfile) #?.REQ
; Falsejump filenotify0
set whatrun "run c:wnotify >>welmat:freq.log welmat:wnotify.cfg $(remfile) $(infile) \"$(remote.address)\" $(line)"
Print $(whatrun)
system $(whatrun)
return
zedzipout:
; Use dummy if no other files exist
PutLog "[$(line)] $<time> Protocol:ZedZip"
setmailerflags "DE,PN"
XprSetup xprzedzap.library TN,OR,B16,F0,E30,AN,DN,KN,SN,RN,C$(BAUD),NN,M1024,UY
set OpenZedZap 1
jump zmodemout
zedzapout:
; turn off the generation of the dummy poll packet
PutLog "[$(line)] $<time> Protocol:ZedZap"
setmailerflags "DN,PN"
XprSetup xprzedzap.library TN,OR,B16,F0,E30,AN,DN,KN,SN,RN,C$(BAUD),NY,M8192,UY
set OpenZedZap 1
zmodemout:
PutLog "[$(line)] $<time> Starting Send"
XprSend ""
FalseJump zmodemclose
PutLog "[$(line)] $<time> (5 second turnaround)"
Delay 3
ModemClear
Delay 2
PutLog "[$(line)] $<time> Starting Receive"
XprReceive ""
zmodemclose:
XprClose
PutLog "[$(line)] $<time> Session Result $(RC)"
ReportSesStat $(RC)
Jump waitring
zedzipin:
; Use dummy if no other files exist
PutLog "[$(line)] $<time> Protocol:ZedZip"
setmailerflags "DE,PN"
XprSetup xprzedzap.library TN,OR,B16,F0,E30,AN,DN,KN,SN,RN,C$(BAUD),NN,M1024,UY
set OpenZedZap 1
jump zmodemin
zedzapin:
; turn off the generation of the dummy poll packet
PutLog "[$(line)] $<time> Protocol:ZedZap"
setmailerflags "DN,PN"
XprSetup xprzedzap.library TN,OR,B16,F0,E30,AN,DN,KN,SN,RN,C$(BAUD),NY,M8192,UY
set OpenZedZap 1
zmodemin:
PutLog "[$(line)] $<time> Starting Receive"
XprReceive ""
FalseJump zmodeminclose
PutLog "[$(line)] $<time> (5 second turnaround)"
Delay 3
ModemClear
Delay 2
PutLog "[$(line)] $<time> Starting Send"
XprSend ""
zmodeminclose:
XprClose
PutLog "[$(line)] $<time> Session Result $(RC)"
ReportSesStat $(RC)
Jump waitring
dofunkyin:
PutLog "[$(line)] $<time> Protocol:FunkyIn"
setmailerflags "DY,PN"
XprSetup xprfts.library $(TESTFLAGS)
XprReceive ""
XprClose
Print "Session Stat: $(RC)\n"
ReportSesStat $(RC)
Jump waitring
dofunkyout:
PutLog "[$(line)] $<time> Protocol:FunkyOut"
setmailerflags "DY,PN"
XprSetup xprfts.library $(TESTFLAGS)
XprSend ""
XprClose
Print "Session Stat: $(RC)\n"
ReportSesStat $(RC)
Jump waitring
; called on both inbound and outbound after receiving a yoohoo
wazoo:
PutLog "[$(line)] $<time> $(remote.sitename) ($(remote.address))"
PutLog "[$(line)] $<time> Sysop: $(remote.sysop)"
system "c:wazoo $(remote.wzcap) $(line).YooHooCanDo"
PutLog "[$(line)] $<time> WaZoo Cap:${$(line).YooHooCanDo}"
CmpI $(host.wzcap) 1
falsejump wazoo.1
jump wazoo.4
wazoo.1:
CmpI $(host.wzcap) 4
falsejump wazoo.2
; ZedZip
jump wazoo.4
wazoo.2:
CmpI $(host.wzcap) 8
falsejump wazoo.3
; ZedZap
jump wazoo.4
wazoo.3:
; Testing
wazoo.4:
set RC $(IsOutbound)
TrueJump wazoo2
Print "It's an Inbound?\n"
system "welmat:Lookup $(remote.address) dh3:IGEN/ $(line)"
; node was found!
CmpI ${$(line).password} ""
TrueJump wazoo4
; there is a password
CmpI ${$(line).password} $(remote.password)
TrueJump wazoo3
PutLog "[$(line)] $<time> Password Error: There:'$(remote.password)' Here:'${$(line).password}'"
set RC FALSE
return
wazoo2:
CmpI $(mailername.$(remote.product)) ""
truejump wazoo2.1
PutLog "[$(line)] $<time> Remote Uses $(mailername.$(remote.product)) v$(remote.product_maj).$(remote.product_min)"
jump wazoo2.2
wazoo2.1:
PutLog "[$(line)] $<time> Remote Uses Prod:$(remote.product) v$(remote.product_maj).$(remote.product_min)"
wazoo2.2:
set RC TRUE
return
wazoo3:
PutLog "[$(line)] $<time> <Password Protected Session>"
Jump wazoo2
wazoo4:
PutLog "[$(line)] $<time> <No Password Set>"
Jump wazoo2
return
setglobals:
; This section should give a good idea of what variables are used by
; Welmat's system.
; clear temporary variables - As well as for documentation purposes, it will
; free up some memory for ya ;-)
Clear event fts1 infile isoutbound whatrun
Clear remfile remote.address remote.cost remote.domain remote.flags
Clear remote.maxbaud remote.net remote.node remote.point remote.zone
Clear remote.number remote.product remote.product_maj remote.product_min
Clear remote.sitename remote.sysop remote.wzcap remote.wzdomain remote.password
Clear NameBuf OwnDevUnit UserName
; System set up variables cleared.
Clear process Workbench RC Result2
; Reset constants
; Inbound directory used to place inbound files - '/' required.
set inbound "Mail:Inbound/"
; used by PutLog and FlushLog
set currentlog all
; directory to look for 'special' files such as 2-d and 4-d .REQ files.
set outbound "Mail:Outbound/"
set pickup "TRUE" trywazoo "TRUE" tryfts1 "TRUE"
; set wfnotify "filenotify" stack 32000
set MaxSendPri 127 MinSendPri -127
set BufferSize 8192
set host.address "FidoNet#1:109/456.0"
set host.zone 1
set host.net 109
set host.node 456
set host.point 0
set host.domain "FidoNet"
set host.sysop "Yves Konigshofer"
set host.Sitename "The Distant Contact"
set host.wzdomain "FidoNet"
; Variables used by ModemInit
set InitLoop 8
set InitWait 3
set Prompt OK
set Atten $(atten)
set HangupString $(hangupstring)
set InitString $(initstring)
set host.wzcap 13
set device $(device) unit $(unit) serflags $(serflags)
set Baud $(baud)
set BaudLocked $(baudlocked)
set DTR_Control $(dtr_control)
set Locked $(locked)
set SlowModem $(slowmodem)
; Set the label that Welmat will go to when it start and ends a send or receive
; of a file in the XPR interface.
; (Set the value equal to the name of the variable itself to make life simple)
set postinbound postinbound postoutbound postoutbound
set preinbound preinbound preoutbound preoutbound
set mailername.0 "MelMail"
set ftsflags.0 "ot"
set mailername.1 "Rover"
set mailername.2 "SEAdog"
set mailername.4 "Slick-150"
set mailername.5 "Opus"
set mailername.6 "Dutchie"
set mailername.8 "Tabby"
set mailername.10 "Wolf-68k"
set mailername.11 "QMM"
set mailername.12 "FrontDoor"
set mailername.19 "GS-Point"
set mailername.26 "D'Bridge"
set mailername.27 "BinkleyTerm"
set mailername.30 "Daisy"
set mailername.31 "Polar Bear"
set mailername.32 "The-Box"
set mailername.33 "STARgate/2"
set mailername.35 "TCOMMail"
set mailername.36 "Banana"
set mailername.37 "RBBSMail"
set mailername.38 "Apple-Netmail"
set mailername.39 "Chameleon"
set mailername.40 "Majik Board"
set mailername.49 "Rose"
set mailername.50 "Paragon"
set mailername.51 "BinkleyTerm/ST"
set mailername.52 "StarNet"
set mailername.54 "QEcho"
set mailername.56 "PBBS"
set mailername.57 "TrapDoor"
set mailername.58 "Welmat"
; Welmat doesn't need MDM7 stuff, but does allow for big filenames
; Flags for old Welmats that are doing DietIFNA.
set ftsflags.58 "7n,by"
set mailername.60 "Odie"
set mailername.61 "Quick Gimme"
set mailername.62 "dbLink"
set mailername.64 "Beagle"
set mailername.65 "Igor"
set mailername.66 "TIMS"
set mailername.67 "Isis"
set mailername.68 "AirMail"
set mailername.74 "BIX-Mail"
set mailername.78 "Lora-CBIS"
set mailername.79 "TDCS"
set mailername.80 "InterMail"
set mailername.84 "QBoxMail"
set mailername.85 "Number 4"
set mailername.86 "Number 5"
set mailername.88 "Merlin"
set mailername.91 "Outpost"
set mailername.94 "rfmail"
set mailername.96 "InfoTex"
set mailername.100 "RC-RAIN"
set mailername.101 "Truffle"
set mailername.103 "White Pointer"
set mailername.105 "Portal of Power"
set mailername.106 "MacWoof"
; Will work with Steve to see what the flags should be.
set ftsflags.106 ""
set mailername.109 "HandyMail"
set mailername.113 "Benjamin"
set mailername.114 "RiBBS"
set mailername.117 "Door2Europe"
set mailername.118 "SWIFT"
set mailername.121 "Harry the Dirty Dog"
set mailername.148 "Fone-Link"
set mailername.152 "DoorMan"
set mailername.154 "SCREAM"
set mailername.155 "MoonMail"
set mailername.157 "MailLink"
set mailername.159 "Black Star"
set mailername.161 "PT"
set mailername.162 "UltiMail"
set mailername.166 "Foodo"
set mailername.168 "Boston"
set mailername.169 "XenoMail"
set mailername.170 "Xenolink"
set mailername.172 "MilqueToast"
set mailername.181 "CommLink"
set mailername.191 "NextBBS"
set mailername.196 "ProMailer"
set mailername.197 "Mega Mail"
set mailername.202 "Arc-Binkley"
set mailername.205 "NMS"
set mailername.206 "BBSCSCAN"
set mailername.208 "LoTek"
return
preinbound:
PutLog "[$(line)] $<time> Receiving: $(tempfile) ($(remfile))"
return
postinbound:
PutLog "[$(line)] $<time> $(filestatus): $(infile) ($(remfile))"
; check to make sure the file was 'received'.
FalseReturn
PutLog "[$(line)] $<time> CPS $(CPS) ($(CPSP)%) FileSize: $(filesize) bytes"
jump filenotify
preoutbound:
PutLog "[$(line)] $<time> Sending: $(localfile) ($(filesize) bytes)"
PutLog "[$(line)] $<time> Remote Name: $(remfile)"
return
postoutbound:
PutLog "[$(line)] $<time> $(filestatus): $(localfile)"
; Check to make sure the file was 'sent'.
FalseReturn
PutLog "[$(line)] $<time> CPS $(CPS) ($(CPSP)%) FileSize: $(filesize) bytes"
return
startup-1:
; USR v.32bis
setbaud 19200
SetStatus "RAW:0/143/664/85/Status Window/NOSIZE/NODRAG/INACTIVE/SCREEN Welmat's Public Screen"
Print "Opened Status Window\n"
AddResponse busy "BUSY"
AddResponse maid "NO CARRIER"
AddResponse line "NO DIAL TONE"
AddResponse 300 "CONNECT"
AddResponse find "CONNECT %d"
AddResponse ring "RING"
; Sets $(baud) and $(baudlocked) and will set device baud rate if device
; is open
set device "serial.device" unit 0 serflags 180 DTR_Control 1
Print "Current Baud Rate:$(baud)\n"
set Atten ~~~AT|
set HangupString ~~~v~~~^~~~|~ATH0|
set InitString ~~~ATZ|
set Locked TRUE
set SlowModem FALSE
jump slaveloop
startup:
; For logging purposes.
set line M
set currentlog all
PutLog "[$(line)] $<time> Startup On $<date> With ${WelmatName}"
; Interesting way to log the output of a program.
; The only problem is the extra return character.
system "version >env:version"
PutLog "[$(line)] $<time> ${version}"
set stack 100000
; Launch the real slaves.
; The parameters are <slave> <msg port name> <startup func>
Launch 1 SLAVE1 startup-1
; Log the numer of slaves, and then exit this slave as it is just used to
; properly launch the other slaves at the moment. This whole thing will
; go away when welmat.library exists.
PutLog "[$(line)] $<time> Started $<slaves> Slaves"
PutLog "[$(line)] $<time> SuperSlave Exiting..."
; SetStatus "NIL:welmat.out"
set RC 0
return